package timeitj.ejb.projects;

import java.io.Serializable;
import java.util.List;
import javax.annotation.security.DeclareRoles;
import javax.annotation.security.RolesAllowed;
import javax.ejb.Local;
import timeitj.ejb.persistence.PersistenceManager;
import timeitj.persistence.Person;
import timeitj.persistence.Project;

/**
 *
 * @author basti
 */
@DeclareRoles({"USERS","ADMINS"})
@Local
public interface ProjectManager extends PersistenceManager<Project, Long>{
    
    /**
     * Returns the projects for the given owner
     * @param owner The person who owns the projects
     * @return Returns the owners Projects in an array
     */
    @RolesAllowed("USERS")
    public List<Project> getProjectsByOwner(Person owner);    
   
}
